<template>
  <el-container style="height: 500px; border: 1px solid #eee">
    <el-container>
      <el-aside class="el-aside" width="200px" style="background-color: #19374b">
        <user-menu/>
      </el-aside>
      <el-main class="elMain">
        <!-- 主要信息 -->
        <el-row class="marginTop100 marginLeft120 ">
          <el-col :span="8" :offset="1">
            <el-form ref="initDatas" :model="initDatas" label-width="100px">
              <el-form-item label="账号类型：">
                  {{initDatas.type}}
                    <el-tag>&nbsp;&nbsp;{{initDatas.auth == true ? '企业认证' : '企业未认证'}}</el-tag>
                    <el-tag color="#67C23A" class="colorWhite">&nbsp;&nbsp;{{initDatas.audit == true ? '供应商认证' : '供应商未认证'}}</el-tag>
              </el-form-item>
              <el-form-item label="登陆账号：">
                  {{initDatas.name}}
              </el-form-item>
              <el-row :gutter="20">
                <el-col :span="20">
                  <el-form-item label="绑定手机号：">
                    <el-input v-model="initDatas.phone"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                   <el-button type="primary">绑定手机</el-button>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="20">
                  <el-form-item label="绑定微信：">
                    <el-input v-model="initDatas.wxname"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                   <el-button type="primary">绑定微信</el-button>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="20">
                  <el-form-item label="绑定节度使：">
                    <el-input v-model="form.name"></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="4">
                   <el-button type="primary">绑定节度使</el-button>
                </el-col>
              </el-row>
              <el-form-item>
                <el-button type="success" @click="onSubmit">保存</el-button>
              </el-form-item>
            </el-form>
          </el-col>
        </el-row>
      </el-main>
    </el-container>
  </el-container>
</template>
<style scoped>
/* 储能项目开始 */
.itemTitle{
  line-height: 84px;
  color: #333333;
  font-size: 24px;
}
/* 储能项目结束 */

.companyAddress,.companySize{
  font-size: 16px;
  color: #c1c1c1;
}
.companyYear{
  font-size: 16px;
  color: #c1c1c1;
  margin: 26px 0;
}
.companyTitle{
  font-size: 20px;
  color: #666666;
  line-height: 26px;
}
.el-breadcrumb,
.el-breadcrumb__separator{
  line-height: 70px;
  font-size: 14px;
  color: #666666;
}
.el-breadcrumb__inner{
  font-size: 14px;
  color: #666666;
  font-weight: 500 !important;
}
.el-header {
  background-color: #b3c0d1;
  color: #333;
  line-height: 60px;
}
.elMain {
  right: 0;
  position: relative;
  padding: 0;
}
.el-container {
  border: 0 !important;
}
</style>
<script>
  import UserMenu from '../../layout/default/components/menu/userMenu'
  import axios from 'axios'
  import {serverBaseUrl} from 'src/common/setting'
  import {apiUrl} from 'src/api/constant/user'
export default {
  name: "Account",
  components: {
    UserMenu
  },
  data() {
    return{
      initDatas:[],
      form: {
          // name: '',
          // region: '',
          // date1: '',
          // date2: '',
          // delivery: false,
          // type: [],
          // resource: '',
          // desc: ''
          // initData:[],
        },
    }
  },
  mounted(){
   this.initData();
  },
  methods: {
      async initData(dataObj) {
      const { $confirm, $api, $message, $router, setUserInfo } = this;
        try {
          const data = await $api.user.test();
          console.log(data);
          if(data.code==0){
            const h = this.$createElement;
            this.$notify({
              title: '消息提示',
              message: h('i', { style: 'color: #67C23A'},'获取信息成功' )
            });
            this.initDatas = data.data;
          }
        } catch ({}) {
          const h = this.$createElement;
          this.$notify({
            title: '消息提示',
            message: h('i', { style: 'color: #ff0000'},data.msg )
          });
        }
    },
    




    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    onSubmit() {
      console.log('submit!');
    }
  }
};
</script>
